package com.umakr.demo.service;

import com.umakr.demo.mapper.NBTreeMapper;
import com.umakr.demo.model.ChengJi;
import com.umakr.demo.model.NBTree;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by yangliu on 2017/8/24.
 */
@Service
public class NBTreeService {

    @Autowired
    NBTreeMapper nbTreeMapper;

    public List<NBTree> findById(Long id){
        return nbTreeMapper.findById(id);
    }
    public  List<NBTree> findByPid(Long pid){
      return nbTreeMapper.findByPid(pid);
    }
    public  List<NBTree> findByTid(Long tid){
        List<NBTree> list = nbTreeMapper.findByTid(tid);
        return list;
    }

    public List<ChengJi> datagridDate(Long bid){
        return nbTreeMapper.datagridDate(bid);
    }
    public Long showSkid(ChengJi chengJi){
        return nbTreeMapper.showSkid(chengJi);
    }
    public void updateFenshu(Long fenshu,Long skid){
        System.out.println(fenshu);
        nbTreeMapper.updateFenshu(fenshu, skid);
    }

}
